﻿using Festival_Locator.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Festival_Locator
{
    public partial class _Default : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public List<GetNextFestivals_Result> GetFestivals()
        {
            //hier halen we met een stored procedure alle volgende festivals op
            try
            {
                var db = new Festival_Locator.Models.groep12_festivalsEntities();
                List<GetNextFestivals_Result> query = db.GetNextFestivals(5).ToList<GetNextFestivals_Result>();
                return query;
            }
            catch (Exception)
            {
                return null;
            }
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }
    }
}